<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title th:text="文档在线编辑">{{title}}</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<style>
    html,body{height: 100%;margin: 0;padding: 0;overflow: hidden;}
</style>
    <!-- <script type="text/javascript" src="{{url_for('static', filename ='jquery/jquery.min.js')}}"></script> -->
    <script type="text/javascript" src="{{url_for('static', filename ='jquery/jquery.min.js')}}"></script>
    <script type="text/javascript" src="http://172.18.17.75/web-apps/apps/api/documents/api.js"></script>
<script type="text/javascript" language="javascript" th:inline="javascript">
var docEditor = null;
      $(function(){
          debugger;
          var type =  ".xlsx";
          if(type === null || type === ''){
              type = 'docx';
          }
          var index = type.indexOf(".");
          if(index>=0){
              type = type.substring(index+1);
          }
          var documentType = "text";
          if(type=="pptx" || type=="ppt"){
              documentType = "presentation";
          }else if(type=="xls" || type=="xlsx"){
              documentType = "spreadsheet";
          }
        docEditor = new DocsAPI.DocEditor("onlyofficeEditor",{
              width: "100%",
              height: "100%",
              type: "desktop",
              documentType: documentType,
              document: {
                  title: "文档名称",
                  url: "{{info.lj}}",
                  fileType: type,
                  key: "{{info.key}}",
                  permissions: {
                      comment: false,
                      review: false
                  }
              },
              editorConfig: {
                  customization:{
                      chat:false,
                      lang: false,
                      about:false,
                      zoom:100,
                      forcesave:true
                  },
                  mode: "view",
                  lang: "zh-CN",
                  user: {
                      "id": "{{info.name}}",
                      "name": "{{info.name}}"
                  },
                //   callbackUrl :"http://172.18.17.116/apitest/office_update",
                  callbackUrl :"http://172.18.48.41:8585/office_update",
                  plugins: {autostart:[],pluginsData:[]},
                  
              }
          });
      });
    </script>
<script>

</script>
</head>
<body>
	<div id="onlyofficeEditor" style="height: 100%;margin: 0;padding: 0"></div>
</body>
</html>
